﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Xml;
using System.Xml.Linq;

namespace Docx2Epub.Epub
{
    class WriterBase
    {
        protected static readonly XNamespace opf = "http://www.idpf.org/2007/opf";
        protected static readonly XNamespace epub = "http://www.idpf.org/2007/ops"; 
        protected static readonly XNamespace dc = "http://purl.org/dc/elements/1.1/";
        protected static readonly XNamespace dcterms = "http://purl.org/dc/terms/";
        protected static readonly XNamespace ncx = "http://www.daisy.org/z3986/2005/ncx/";
        protected static readonly XNamespace xhtml = "http://www.w3.org/1999/xhtml";

        protected XmlNamespaceManager nsmgr;

        protected WriterBase()
        {
            this.nsmgr = new XmlNamespaceManager(new NameTable());
            nsmgr.AddNamespace("opf", opf.NamespaceName);
            nsmgr.AddNamespace("epub", epub.NamespaceName);
            nsmgr.AddNamespace("dc", dc.NamespaceName);
            nsmgr.AddNamespace("dcterms", dcterms.NamespaceName);
            nsmgr.AddNamespace("ncx", ncx.NamespaceName);
            nsmgr.AddNamespace("xhtml", xhtml.NamespaceName);
        }

    }
}
